package com.nny.alarm.edit.adapter;

import android.content.Context;

import com.nny.alarm.edit.DialAdapter;
import com.uxwine.skin.Skin;

public class DateAdapter extends DialAdapter
{

	public DateAdapter(Context ctx, int date)
	{
		super(ctx);
		mnMax = 31 - 1;
		setPosition(date - 1);
	}
	
	public DateAdapter(Context ctx, int date, int max)
	{
		super(ctx);
		mCtx = ctx;
		mnMax = max - 1;
		date = date < max ? date : max;
		setPosition(date - 1);
	}
	
	@Override
	public String getMarkText(int index)
	{
		return (index + 1) + "";
	}

	@Override
	public int getMarkCount()
	{
		return 31;
	}

	@Override
	public int getBtnDrawable()
	{
		return Skin.getDrawable(mCtx, "dial_nav_date");
	}

	@Override
	public int getDialDrawable()
	{
		return Skin.getDrawable(mCtx, "dial_mark_31");
	}

	@Override
	public long getValue(int position)
	{
		return position + 1;
	}

}
